<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container {
            width: 300px;
            height: 300px;
            background-color: blue;
        }
        .box {
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .xbox {
            width: 100px;
            height: 100px;
            background-color: yellow;
        }
        .change {
            background-color: aqua;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="box">
            <div class="xbox">

            </div>
        </div>
    </div>
    <script>
        var container = document.querySelector(".container");
        var box = document.querySelector(".box");
        var xbox = document.querySelector(".xbox");
        // container.onmouseenter = function () {
        //     this.classList.add("change");
        // }
        // container.onmouseleave = function () {
        //     this.classList.remove("change");
        // }
        container.onmouseover = function () {
            this.classList.add("change");
            // this.innerHTML = '1111111111111111';
        }
        container.onmouseout = function () {
            this.classList.remove("change");
            // this.innerHTML = '222222';
        }
    </script>
</body>
</html>